pub enum Message {
    LoginResponse(String),
    Order(u32, String),
}

#[cfg(test)]
mod test {
    use super::*;

    #[test]
    fn test_message(){
        if let Message::LoginResponse(ref body) = Message::LoginResponse("hello".to_owned()){
            assert_eq!(&"hello".to_owned(), body);
        }

        if let Message::Order(seq_no, ref body) = Message::Order(1, "order".to_owned()) {
            assert_eq!(&"order".to_owned(), body);
            assert_eq!(1, seq_no);
        }
    }
}
